import {DataStore} from "./DataStore.js";

export class ObtainUserData {
    getData(succendCallbacks, failCallbacks) {
        const params = {
            success: res => {
                DataStore.getInstance().put('userInfo', res);
                succendCallbacks();
            },
            fail: res => {
                failCallbacks(res);
            }
        }
        wx.getUserInfo(params);
    }
}